﻿<Page x:Class="Framework_Tool.UnitView"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      mc:Ignorable="d" 
      d:DesignHeight="547" d:DesignWidth="1042"
	Title="UnitView">

    <Grid Name="mainContent" Loaded="mainContent_Loaded_1">
        <Border BorderBrush="#FF311E51" BorderThickness="3" CornerRadius="30" Width="1042" Height="547" VerticalAlignment="Top" HorizontalAlignment="Left">
            <Grid>
                <Border Name="mask" CornerRadius="27" >
                    <Border.Background>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="#FF311E51" Offset="0"/>
                            <GradientStop Color="#FF594F6B" Offset="1"/>
                        </LinearGradientBrush>
                    </Border.Background>
                </Border>
                <StackPanel HorizontalAlignment="Left" Orientation="Horizontal" Margin="30,0,0,0" VerticalAlignment="Top" Width="874">
                    <Button Margin="0,0,25,0" x:Name="viewUnitBtn" Content="View" Foreground="White" FontSize="20" Background="{x:Null}" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" />
                    <Button Margin="0,0,25,0" x:Name="addUnitBtn" Content="Add" Foreground="White" FontSize="20" Background="{x:Null}" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="addUnitBtn_Click_1"/>
                    <Button Margin="0,0,25,0" x:Name="updateUnitBtn" Content="Update" Foreground="White" FontSize="20" Background="{x:Null}" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="updateUnitBtn_Click_1" />
                    <Button Margin="0,0,25,0" x:Name="deleteunitBtn" Content="Delete" Foreground="White" FontSize="20" Background="{x:Null}" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="deleteunitBtn_Click_1" />
                    <Button Margin="0,0,25,0" x:Name="searchUnitBtn" Content="Search" Foreground="White" FontSize="20" Background="{x:Null}" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="searchUnitBtn_Click_1" />
                </StackPanel>
                <Label x:Name="StaffTxt" Content="Units" Margin="70,65,0,0" Foreground="White" VerticalAlignment="Top" HorizontalAlignment="Left" FontSize="20" RenderTransformOrigin="-0.551,0.513" FontWeight="Bold" />
                <ListView ItemsSource="{Binding}" x:Name="displayUnitDetailsLstvw" Margin="70,119,0,0" Height="300" Width="920" HorizontalAlignment="Left" VerticalAlignment="Top">
                    <ListView.ItemContainerStyle>
                        <Style TargetType="ListViewItem">
                            <Setter Property="Height" Value="35" />
                        </Style>
                    </ListView.ItemContainerStyle>
                    <ListView.View>
                        <GridView x:Name="gridView">
                            <GridViewColumn Header="Unit ID" DisplayMemberBinding="{Binding Path=unitID}" />
                            <GridViewColumn Header="Unit Title" DisplayMemberBinding="{Binding Path=unitTitle}" />
                            <GridViewColumn Header="Description" DisplayMemberBinding="{Binding Path=description}" />
                            <GridViewColumn Header="Taught By"  >
                                <GridViewColumn.CellTemplate>
                                    <DataTemplate>
                                        <TextBlock >
                                            <TextBlock.Text>
                                                <MultiBinding StringFormat="{}{0} {1}">
                                                    <Binding Path="firstName"></Binding>
                                                    <Binding Path="surname"></Binding>
                                                </MultiBinding>
                                            </TextBlock.Text>
                                        </TextBlock>
                                    </DataTemplate>
                                </GridViewColumn.CellTemplate>
                            </GridViewColumn>
                        </GridView>
                    </ListView.View>
                </ListView>
                <Grid Margin="0,0,350,30" VerticalAlignment="Bottom" HorizontalAlignment="Right">
                    <Border BorderBrush="#FF28B5D3" BorderThickness="1" HorizontalAlignment="Left" Height="50"  Width="130" CornerRadius="12">
                        <Border.Background>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="#FF28B5D3" Offset="0.406"/>
                                <GradientStop Color="White"/>
                            </LinearGradientBrush>
                        </Border.Background>
                    </Border>
                    <Button Content="Update" x:Name="unitView_Update" FontSize="25" Height="50" Background="{x:Null}" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Foreground="White" Width="130" Click="unitView_Update_Click_1" />
                </Grid>
                <Grid Margin="0,0,200,30" VerticalAlignment="Bottom" HorizontalAlignment="Right">
                    <Border BorderBrush="#FF28B5D3" BorderThickness="1" HorizontalAlignment="Left" Height="50" Width="130" CornerRadius="12">
                        <Border.Background>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="#FF28B5D3" Offset="0.406"/>
                                <GradientStop Color="White"/>
                            </LinearGradientBrush>
                        </Border.Background>
                    </Border>
                    <Button Content="Delete" x:Name="unitView_Delete" FontSize="25" Height="50" Background="{x:Null}" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Foreground="White" Width="130" Click="unitView_Delete_Click_1" />
                </Grid>
                <Grid Margin="0,0,50,30" VerticalAlignment="Bottom" HorizontalAlignment="Right">
                    <Border BorderBrush="#FFC8C8C8" BorderThickness="1" HorizontalAlignment="Right" Height="50"  Width="130" CornerRadius="12">
                        <Border.Background>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="#FFC8C8C8" Offset="0.406"/>
                                <GradientStop Color="White"/>
                            </LinearGradientBrush>
                        </Border.Background>
                    </Border>
                    <Button Content="Cancel" x:Name="unitView_Cancel"  FontSize="25" Height="50" Background="{x:Null}" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Foreground="Black" Width="130" Click="unitView_Cancel_Click_1" />
                </Grid>
            </Grid>
        </Border>
    </Grid>
</Page>
